<template>
  <div class="">
  	
  </div>
</template>

<script>
export default {
    // props:["msg"],
	components: {
        
    },
	data() {
		return {
			title:{
				
			},
		}
	},
	methods:{
        timechangeShowHour(time1){
            var aa=time1.slice(4,6)+"月"+time1.slice(6,8)+"日 "+time1.slice(8,10)+"时"+"00分"
            return aa;
        },
        timechangeShow(time1){
            var aa=time1.slice(0,4)+"年"+time1.slice(4,6)+"月"+time1.slice(6,8)+"日 "+time1.slice(8,10)+"时"+"00分"
            return aa;
        },
        timechangeShow2(time1){
            var aa=time1.slice(0,4)+"年"+time1.slice(5,7)+"月"+time1.slice(8,10)+"日 "+time1.slice(11,13)+"时"+"00分"
            return aa;
        },
        getTimeCShow(str, idx) {
            var pattern = /(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/;
            var formatedDate = str.replace(pattern, '$1/$2/$3 $4:$5:$6');
            var timeC = new Date(formatedDate);
            return this.getSexTimeShow(timeC, idx);
        },
        getSexTimeShow(timeC, aa) {
            var date1 = timeC,
                time1 = date1.getFullYear() + "-" + (date1.getMonth() + 1) + "-" + date1.getDate();//time1表示当前时间
            var date2 = new Date(date1);
            date2.setMinutes(date1.getMinutes() + aa);
            var Min = date2.getMinutes() > 9 ? date2.getMinutes() : "0" + (date2.getMinutes());
            var Hour = date2.getHours() > 9 ? date2.getHours() : "0" + (date2.getHours());
            var Mounth = date2.getMonth() + 1 > 9 ? date2.getMonth() + 1 : "0" + (date2.getMonth() + 1);
            var Day = date2.getDate() > 9 ? date2.getDate() : "0" + (date2.getDate());
            var time2 = "" + date2.getFullYear() + Mounth + Day + Hour + Min + "00";
            return time2;
        },
        timePostFomat(n) {
            var time = n.slice(0, 4) + n.slice(5, 7) + n.slice(8, 10) + n.slice(11, 13) + n.slice(14, 16) + '00'
            return time;
        },
        getthisTime() {
            var date = new Date();
            var Day = date.getDate()>9?date.getDate():"0"+date.getDate();
            var Year = date.getFullYear();
            var Mounth = date.getMonth()>=9?date.getMonth()+1:"0"+(date.getMonth()+1);
            var hour=date.getHours()>9?date.getHours():"0"+date.getHours();
            var min=date.getMinutes()>9?date.getMinutes():"0"+date.getMinutes();
            var end=Year+""+Mounth+""+Day+hour+min+"00";
            return end;
        },

        // 排序
        compare(property){
            return function(a,b){
                var value1 = a[property];
                var value2 = b[property];
                return value1 - value2;
            }
        },
        compare2(property){
            return function(a,b){
                var value1 = a[property];
                var value2 = b[property];
                return value2 - value1;
            }
        },
        formatDateTime(time){
            let date = new Date(time)
            let year = date.getFullYear()
            let month = (date.getMonth() +1) < 10? ("0" + date.getMonth()) : (date.getMonth() + 1)
            let day = date.getDate() < 10 ? ("0" + date.getDate()) : date.getDate()
            let hour = date.getHours() < 10 ? ("0" +date.getHours()) : date.getHours()
            let min = date.getMinutes() < 10 ? ("0" + date.getMinutes()) : date.getMinutes()
            let dateTime = year+"-"+month+"-"+day+" "+hour+":"+min
            return dateTime
        }
    },
	mounted(){
		this.$emit('refreshTop',this.title)
	}
}
</script>

<style lang="less">

</style>


